package com.livesource.client.web.liveTaskBoard;

import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.livesource.client.web.sourceCode.LiveDocumentationHelpIcon;

public class TitlePanel extends HorizontalPanel {

	public TitlePanel(String title, ClickHandler buttonRefreshClickHandler) {

		this.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);

		this.setSpacing(10);

		if (title != null) {

			HTML htmlTitle = new HTML("<b><font color='blue' size='3'>" + title
					+ "</font></b>");
			this.add(htmlTitle);
		}

		Label space = new Label(" ");
		space.setWidth("800px");
		this.add(space);

		if (buttonRefreshClickHandler != null) {

			this.add(new ButtonRefresh(buttonRefreshClickHandler));
		}

		this.add(new LiveDocumentationHelpIcon("LiveSourceWeb"));
	}
}
